package com.jacobson.core.di.modules

import android.app.Activity
import android.content.Context
import com.jacobson.core.di.annotation.ActivityScope
import dagger.Module
import dagger.Provides
import javax.inject.Named

/**
 * ================================================
 *
 *  @author Wucz on 2018/7/24 14:53
 * ================================================
 */
@Module
class ActivityModule(
        val activity: Activity
) {
    @Provides
    @ActivityScope
    @Named("context")
    fun provideContext(): Context = activity

    @Provides
    @ActivityScope
    fun provideActivity(): Activity = activity
}